package views
{
	import events.CaptchaEvent;
	
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	
	import models.CaptchaModel;
	
	import utility.Captcha;

	public class ViewCaptcha extends MovieClip
	{
		private var clip:MovieClip;
		private var modelCaptcha:CaptchaModel;
		public function ViewCaptcha($clip:MovieClip)
		{
			super();
			init($clip);
		}
		private function init($clip:MovieClip):void
		{
			clip=$clip;
			modelCaptcha=new CaptchaModel(clip);			
			modelCaptcha.addEventListener(CaptchaEvent.ON_CHANGE_CAPTCHA,viewCaptcha);
		}
		private function viewCaptcha(evt:CaptchaEvent):void
		{
			trace("View captcha: "+evt.dataCaptcha);
		}
	}
	/* End Class */
}